///**************************************************************************************
// *
// * @(#) CameraController.java
// * @Package com.jgdt.jgdtkasannong_university_gene_backend.controller
// **************************************************************************************/
//package com.jgdt.jgdtkasannong_university_gene_backend.controller.test;
//
//import com.jgdt.jgdtkasannong_university_gene_backend.service.test.LeChangeService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.HashMap;
//import java.util.Map;
///**
// * @description:
// * @author: huangAn 测试接口 todo 测试，注意生产需要注释该接口
// * @createDate: 2025/04/29
// */
//@RestController
//@RequestMapping("/test/camera")
//public class CameraController {
//
//    @Autowired
//    private LeChangeService leChangeService;
//
//    @GetMapping("/playUrl")
//    public Map<String, String> getPlayUrl() throws Exception {
//        String accessToken = leChangeService.getAccessToken();
//        String kitToken = leChangeService.getKitToken(accessToken);
//
//        // 构建播放URL:cite[1]:cite[2]
//        String playUrl = String.format("imou://open.lechange.com/%s/%s/1?streamId=1",
//                leChangeService.getConfig().getDeviceId(),
//                leChangeService.getConfig().getChannelId());
//
//        Map<String, String> result = new HashMap<>();
//        result.put("url", playUrl);
//        result.put("kitToken", kitToken);
//        return result;
//    }
//
//    @GetMapping("/snapshot")
//    public Map<String, String> getSnapshot() throws Exception {
//        String accessToken = leChangeService.getAccessToken();
//        String imageUrl = leChangeService.captureImage(accessToken);
//
//        Map<String, String> result = new HashMap<>();
//        result.put("imageUrl", imageUrl);
//        return result;
//    }
//}
//
//
//
//
